<template>
  <!-- 用户长按弹窗 -->
  <up-popup :show="actionBarShow" v-if="actionBarShow" :round="20" mode="bottom" @close="actionBarShow = false">
    <view class="longPressPop">
      <view class="title">操作 <i @tap="actionBarShow = false"></i> </view>
      <view class="popList">
        <view class="copy" v-if="actionBarBoj.Cmd == 1"
          @tap="copyText(actionBarBoj.Content.Text); actionBarShow = false">
          复制内容</view>
        <view class="reply" @tap="longPressPopFn(1)">回复内容</view>
        <view class="detele" @tap="longPressPopFn(2)">删除内容</view>
      </view>
    </view>
  </up-popup>
</template>

<script setup lang="ts">
import { ref } from "vue";
const emit = defineEmits();
let actionBarShow = ref<boolean>(false);
let actionBarBoj = ref<any>({});

const openShow = (item: any) => {
  actionBarShow.value = true
  console.log(item)
  actionBarBoj.value = item

}

const longPressPopFn = (longPressPopType:number) => {
  emit("longPressPopFn", { ...actionBarBoj.value,longPressPopType });
  actionBarShow.value = false

};



defineExpose({
  openShow
})
</script>
<style scoped lang="scss">
@import "../../../static/scss/chat.scss";
</style>
